<template>
  <div class="tourbody">
   
  </div>
</template>
<script>
export default {
  data() {
    return {}
  },
  props: {
    info: {
      type: Object,
      default: () => ({})
    }
  },
  components: {},
  methods: {
    get_int_dec(num, type) {
      // @type  int-整数部分 ,dec - 小数部分
      num = num + ''
      num = num.toString()
      var decimal = 2
      decimal = decimal >= 2 && decimal < 6 ? 2 : decimal
      decimal = decimal == '0' ? 0 : decimal || 2
      let index = num.indexOf('.')
      if (index !== -1) {
        num = num.substring(0, decimal + index + 1)
      } else {
        num = num.substring(0)
      }
      num = parseFloat(num).toFixed(decimal)
      if (type == 'int') {
        return parseInt(num)
      } else if (type == 'dec') {
        return '.' + num.toString().split('.')[1] || '.00'
      }
    }
  }
}
</script>
<style lang="less" scoped>
.tourbody{
width: 94%;
    margin: 0 auto;
}

</style>
